<?php
/**
 * Created by PhpStorm.
 * User: 沁塵
 * Date: 2019/4/20
 * Time: 19:57
 */

namespace app\api\controller\v1;

use app\api\model\Config as ConfigModel;
use think\Request;

class Config
{

    public function get(Request $request)
    {
        $params = $request->get();
        $tagArr = ConfigModel::where('name',$params["name"])->select();
        $tag = [];
        foreach ($tagArr as $v) {
            $tag[$v['key']][] = $v['value'];
        }

        return writeJson(200, $tag, '获取成功');
    }
}